<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<include file="Public/header"/>
            <body>
                <div class="row">
                    <div class="col-lg-12 col-md-12 margin-top-20">
                        <div class="panel panel-white">
                            <div class="panel-heading">
                                <h5 class="panel-title">筛选</h5>
                            </div>
                            <form role="form" class="form-inline">
                                <div class="panel-body">
                                    <div class="form-group">
                                        <label for="title" class="sr-only">
                                            文章标题
                                        </label>
                                        <input type="text" name="title" id="title"
                                               placeholder="文章标题" class="form-control">
                                    </div>
                                    <div class="form-group  ">
                                        <button class="btn btn-primary" type="submit">
                                            提交
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <table class="table table-hover" id="sample-table-1">
                    <thead>
                    <tr>
                        <th class="center">#</th>
                        <th>标题</th>
                        <th>作者</th>
                        <th>发布时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="data" id="vo">
                        <tr>
                            <td class="center">#</td>
                            <td>
                                <a href="{:U('wap/usernotice/notice_detail')}?id={$vo.id}"">{$vo.title}</a>
                            </td>
                            <td>{$vo.author}</td>
                            <td>{$vo.add_time|date='Y-m-d H:i:s',###}</td>
                            <td>
                                <input type="checkbox" article_id="{$vo.id}" name="choose"/>
                            </td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
                <div class="b_q col-md-2 col-md-offset-11">
                    <button class="btn btn-primary" id="close_goods">
                        确定
                    </button>
                </div>
                <div class="b_q col-md-4 col-md-offset-5">
                    <div class="fm-footer-copyright get_more">
                        <if condition="$count gt 10 && count($list) eq 10">
                            点击加载更多
                            <else/>
                            无更多数据
                        </if>
                    </div>
                </div>
                <input type="hidden" name="p" data="2" value="2"/>
                <!-- end: YOUR CONTENT HERE -->
            </div>
        </div>
    </div>
    <!--  FOOTER and SETTINGS -->
    <!-- end: FOOTER -->
    <!-- start: OFF-SIDEBAR -->

    <!-- end: OFF-SIDEBAR -->
</div>
<!-- start: MAIN JAVASCRIPTS -->
<include file="Public/javascript"/>
</body>

<script type="text/javascript">
    $('#close_goods').click(function () {   //获得商品选中值并关闭该页面
        var index = parent.layer.getFrameIndex(window.name);
        var article_id = "";
        $('[name="choose"]:checked').each(function () {
            if ($(this).is(":checked")) {
                if (article_id == '') {
                    article_id = $(this).attr('article_id');
                } else {
                    article_id += ',' + $(this).attr('article_id');
                }
            }
        })
        parent.$('#tui_article').val(article_id);
        parent.layer.close(index);
    });
</script>
</html>
